<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core"
                template="/templates/mainLayout.xhtml">

    <ui:define name="title">Game</ui:define>
    <ui:define name="content">
        <f:metadata>
            <f:viewParam id="id" name="id" value="#{gameBean.gameId}" />
        </f:metadata>
        <f:event type="preRenderView" listener="#{gameBean.preRenderGameDetailAction()}" />
        <style type="text/css">
            .colStyle1 {
                vertical-align: top;
                width: 65%;
            }
            .colStyle2 {
                vertical-align: top;
            }
            
            .gameGridColStyle1 {
                vertical-align: top;
                width: 40%;
            }
            .gameGridColStyle2 {
                vertical-align: top;
            }
        </style>
        <h:form id ="contentForm">
            <h:panelGrid columns="2" style="width: 100%;" cellpadding="5" columnClasses="colStyle1, colStyle2">
                <p:panel header="#{gameBean.game.name}">
                    <h:panelGrid columns="2" style="width: 100%" cellpadding="5" columnClasses="gameGridColStyle1, gameGridColStyle2">
                        <p:graphicImage url="#{gameBean.game.iconUrl}"/>
                        <h:outputText value="#{gameBean.game.name}" style="font-size: 16px; font-weight: bold;"/>
                    </h:panelGrid>
                    
                    <p:tabView dynamic="true">
                        <p:tab title="Giới thiệu game">
                            <h:outputText value="#{gameBean.game.introduction}" escape="false"/>
                        </p:tab>
                        
                        <p:tab title="Hướng dẫn chơi game">
                            <h:outputText value="#{gameBean.game.guide}" escape="false"/>
                        </p:tab>
                    </p:tabView>
                </p:panel>
                
                <h:panelGroup>
                    <p:panel header="Tin tức" style="100%;">
                        
                    </p:panel>

                    <p:panel header="Cao thủ" style="margin-top: 5px;"></p:panel>
                </h:panelGroup>
            </h:panelGrid>
        </h:form>
    </ui:define>
</ui:composition>